home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / RND-STR.DMO < prev    next >
Text File  |  1996-07-04  |  2KB  |  45 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   RND-STR .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB01.INC"
  22. COLOR 7, 0
  23. CLS
  24.  
  25. ? "┌────────────────────────────────────────────────────────────
  26. ? "│ fRNDstr$( LowAscii%, HighAscii%, Length% )
  27. ? "├────────────────────────────────────────────────────────────────
  28. ? "│ I just got tired of writing this one every third program, so
  29. ? "│ here it is!
  30. ? "└─────────────────────────────────────────────────────────────────────────
  31.  
  32. RANDOMIZE TIMER
  33.  
  34. FOR HowLong% = 10 TO 20 STEP 2                      '
  35.   PRINT "┤ "; fRNDstr$( 65, 90, HowLong% ); " ├"    ' A -> Z
  36. NEXT                                                '
  37. PRINT                                               '
  38.                                                     '
  39. FOR HowLong% = 20 TO 10 STEP -2                     '
  40.   PRINT "┤ "; fRNDstr$( 97, 122, HowLong% ); " ├"   ' a - z
  41. NEXT                                                '
  42.                                                     '
  43. PRINT                                               '
  44. PRINT fRNDstr$( 48, 57, 50 )                        ' 0 - 9
  45.